package util;

import java.util.Date;

public class DateUtil {
	public static String getDateStr(Date date){
		String str = (1900 + date.getYear()) + "-" + (date.getMonth()+1) + "-" + date.getDate() + "-" + date.getHours();
		return str;
	}
	
	public static String getNewsDateStr(Date date){
		String str = (1900 + date.getYear()) + "-" + (date.getMonth()+1) + "-" + date.getDate();
		return str;
	}
	
	public static void main(String[] args) {
		System.out.println(DateUtil.getDateStr(new Date()));
	}
}
